package com.jwlifer.service.impl;

import com.jwlifer.dao.domain.JwliferAdmin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jwlifer.service.jwliferCacheService;
import com.jwlifer.service.couchbase.CouchbaseConnector;

@Service("jwliferCacheService")
public class jwliferCacheServiceImpl implements jwliferCacheService {

	@Autowired
	private CouchbaseConnector couchbaseConnector;
	
	public JwliferAdmin getJwliferAdmin(String key) {
		// TODO Auto-generated method stub
		return (JwliferAdmin)couchbaseConnector.get(key);
	}

	public void cacheJwliferAdmin(String key,
			JwliferAdmin conf) {
		// TODO Auto-generated method stub
		couchbaseConnector.set(key, 3600, conf);
	}
	

}
